package com.test;

import com.test.service.TelPhoneBrand;

import java.util.ServiceLoader;

/**
 * 主业务方法
 *
 * @author ljs 2021/12/16
 */
public class SpiMain {
    /**
     * 执行业务方法
     */
    public static void execute() {
        ServiceLoader<TelPhoneBrand> telPhoneBrands = ServiceLoader.load(TelPhoneBrand.class);
        for (TelPhoneBrand telPhoneBrand : telPhoneBrands) {
            telPhoneBrand.showBrand();
        }
    }
}
